import React, { Component } from 'react';
import { Provider } from 'react-redux'

import { Route, BrowserRouter, Switch } from 'react-router-dom'
import store from './store'
import Login from './container/login'
import Register from './container/register'
import Bossinfo from './container/bossinfo'
import Geniusinfo from './container/geniusinfo'
import Dashboard from './container/dashboard'
import AutoRoute from './component/autoRoute'
import './config'


class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <BrowserRouter>
          <div>
            <AutoRoute></AutoRoute>
            <Switch>
              <Route path='/login' exact component={Login}></Route>
              <Route path='/register' exact component={Register}></Route>
              <Route path='/bossinfo' exact component={Bossinfo}></Route>
              <Route path='/geniusinfo' exact component={Geniusinfo}></Route>
              <Route component={Dashboard}></Route>
            </Switch>
          </div>
        </BrowserRouter>
      </Provider>
    );
  }
}

export default App;
